


function actionFormatter(){
    var edit=`<button class="cc btn btn-warning btn-sm">删除<tton>`;
    return edit;
}
//用户修改
var actionEvents ={
    "click .cc":function(a,b,row){
        console.log(row);
        $.post("faces/del",{"id":row.id}).done(msg=>{
            toastr.success(msg);
            $("#faceTb").bootstrapTable("refresh");
        });
    }
};




function add() {
    $("#insert").dialog("show");
}

//调用模态框的公共代码，
$("#insert").dialog({
    title:"添加朝向",
    btnBind(){
        var faceName=$("#faces").val();
        $.post("faces/add",{"faces":faceName}).done(msg=>{
            toastr.success(msg);
            $("#insert").dialog("hide");
            $("#faceTb").bootstrapTable("refresh");
        })
    }
});